Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-25 15:50:10 +01:00
Merge pull request #1247 from creeper123123321/master
More plugin messages
Dieser Commit ist enthalten in:
Commit
6731ade5d9
@ -497,11 +497,13 @@ public class InventoryPackets {
|
|||||||
case "WDL|INIT":
|
case "WDL|INIT":
|
||||||
return "wdl:init";
|
return "wdl:init";
|
||||||
case "WDL|CONTROL":
|
case "WDL|CONTROL":
|
||||||
return "wdl:init";
|
return "wdl:control";
|
||||||
case "WDL|REQUEST":
|
case "WDL|REQUEST":
|
||||||
return "wdl:request";
|
return "wdl:request";
|
||||||
|
case "bungeecord:main":
|
||||||
|
return null;
|
||||||
default:
|
default:
|
||||||
return old.matches("([0-9a-z_-]*:)?[0-9a-z_/.-]*") // Identifier regex
|
return old.matches("([0-9a-z_.-]*:)?[0-9a-z_/.-]*") // Identifier regex
|
||||||
? old : null;
|
? old : null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -706,7 +708,22 @@ public class InventoryPackets {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static String getOldPluginChannelId(String newId) {
|
public static String getOldPluginChannelId(String newId) {
|
||||||
|
if (!newId.matches("([0-9a-z_.-]*:)?[0-9a-z_/.-]*")) {
|
||||||
|
return null; // Not valid
|
||||||
|
}
|
||||||
|
int separatorIndex = newId.indexOf(':');
|
||||||
|
if (separatorIndex == -1 || separatorIndex == 0) { // Vanilla parses ``:`` and ```` as ``minecraft:``
|
||||||
|
newId = "minecraft:" + newId;
|
||||||
|
}
|
||||||
switch (newId) {
|
switch (newId) {
|
||||||
|
case "minecraft:trader_list":
|
||||||
|
return "MC|TrList";
|
||||||
|
case "minecraft:book_open":
|
||||||
|
return "MC|BOpen";
|
||||||
|
case "minecraft:debug/paths":
|
||||||
|
return "MC|DebugPath";
|
||||||
|
case "minecraft:debug/neighbors_update":
|
||||||
|
return "MC|DebugNeighborsUpdate";
|
||||||
case "minecraft:register":
|
case "minecraft:register":
|
||||||
return "REGISTER";
|
return "REGISTER";
|
||||||
case "minecraft:unregister":
|
case "minecraft:unregister":
|
||||||
@ -722,8 +739,7 @@ public class InventoryPackets {
|
|||||||
case "wdl:request":
|
case "wdl:request":
|
||||||
return "WDL|REQUEST";
|
return "WDL|REQUEST";
|
||||||
default:
|
default:
|
||||||
return newId.matches("([0-9a-z_-]*:)?[0-9a-z_/.-]*") // Identifier regex
|
return newId;
|
||||||
? newId : null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren