mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-11-21 18:16:03 +01:00
added 1.10 support
This commit is contained in:
parent
06794ac4a7
commit
4f0b06b32c
@ -1,8 +0,0 @@
|
||||
<component name="ArtifactManager">
|
||||
<artifact type="jar" name="Advanced-Portals:jar">
|
||||
<output-path>$USER_HOME$/Desktop/Sekwah41 plugin test/plugins</output-path>
|
||||
<root id="archive" name="AdvancedPortals.jar">
|
||||
<element id="module-output" name="Advanced-Portals" />
|
||||
</root>
|
||||
</artifact>
|
||||
</component>
|
@ -1,6 +1,6 @@
|
||||
main: com.sekwah.advancedportals.AdvancedPortalsPlugin
|
||||
name: AdvancedPortals
|
||||
version: 0.0.19
|
||||
version: 0.0.20
|
||||
author: sekwah41
|
||||
description: An advanced portals plugin for bukkit.
|
||||
commands:
|
||||
|
27
src/com/sekwah/advancedportals/compat/bukkit/v1_10_R1.java
Normal file
27
src/com/sekwah/advancedportals/compat/bukkit/v1_10_R1.java
Normal file
@ -0,0 +1,27 @@
|
||||
package com.sekwah.advancedportals.compat.bukkit;
|
||||
|
||||
import net.minecraft.server.v1_10_R1.IChatBaseComponent;
|
||||
import net.minecraft.server.v1_10_R1.PacketPlayOutChat;
|
||||
import org.bukkit.craftbukkit.v1_10_R1.entity.CraftPlayer;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
|
||||
public class v1_10_R1 implements NMS {
|
||||
|
||||
@Override
|
||||
public void sendRawMessage(String rawMessage, Player player) {
|
||||
IChatBaseComponent comp = IChatBaseComponent.ChatSerializer.a(rawMessage);
|
||||
// "json message", position(0: chat (chat box), 1: system message (chat box), 2: above action bar)
|
||||
PacketPlayOutChat packet = new PacketPlayOutChat(comp, (byte) 1);
|
||||
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void sendActionBarMessage(String rawMessage, Player player) {
|
||||
IChatBaseComponent comp = IChatBaseComponent.ChatSerializer.a(rawMessage);
|
||||
// "json message", position(0: chat (chat box), 1: system message (chat box), 2: above action bar)
|
||||
PacketPlayOutChat packet = new PacketPlayOutChat(comp, (byte) 2);
|
||||
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user