mirror of
https://github.com/TotalFreedomMC/BukkitTelnet.git
synced 2024-12-28 11:04:22 +00:00
1.14
This commit is contained in:
parent
da383026e5
commit
3e57ef87bf
5 changed files with 25 additions and 12 deletions
14
pom.xml
14
pom.xml
|
@ -39,13 +39,18 @@
|
|||
<id>spigot</id>
|
||||
<url>https://hub.spigotmc.org/nexus/content/groups/public/</url>
|
||||
</repository>
|
||||
|
||||
<repository>
|
||||
<id>maven-central</id>
|
||||
<url>https://repo1.maven.org/maven2/</url>
|
||||
</repository>
|
||||
</repositories>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot-api</artifactId>
|
||||
<version>1.12-pre5-SNAPSHOT</version>
|
||||
<version>1.14.4-R0.1-SNAPSHOT</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
|
@ -63,6 +68,13 @@
|
|||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.googlecode.json-simple</groupId>
|
||||
<artifactId>json-simple</artifactId>
|
||||
<version>1.1.1</version>
|
||||
</dependency>
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
package me.totalfreedom.bukkittelnet.api;
|
||||
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
public class TelnetCommandEvent extends TelnetEvent implements Cancellable
|
||||
public class TelnetCommandEvent extends Event implements Cancellable
|
||||
{
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
@ -15,6 +17,7 @@ public class TelnetCommandEvent extends TelnetEvent implements Cancellable
|
|||
|
||||
public TelnetCommandEvent(CommandSender sender, String command)
|
||||
{
|
||||
super(!Bukkit.getServer().isPrimaryThread());
|
||||
this.cancelled = false;
|
||||
this.sender = sender;
|
||||
this.command = command;
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
package me.totalfreedom.bukkittelnet.api;
|
||||
|
||||
import org.bukkit.event.server.ServerEvent;
|
||||
|
||||
public abstract class TelnetEvent extends ServerEvent
|
||||
{
|
||||
|
||||
}
|
|
@ -2,8 +2,10 @@ package me.totalfreedom.bukkittelnet.api;
|
|||
|
||||
import org.bukkit.event.Cancellable;
|
||||
import org.bukkit.event.HandlerList;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.event.Event;
|
||||
|
||||
public class TelnetPreLoginEvent extends TelnetEvent implements Cancellable
|
||||
public class TelnetPreLoginEvent extends Event implements Cancellable
|
||||
{
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
@ -15,6 +17,7 @@ public class TelnetPreLoginEvent extends TelnetEvent implements Cancellable
|
|||
|
||||
public TelnetPreLoginEvent(String ip, String name, boolean bypassPassword)
|
||||
{
|
||||
super(!Bukkit.getServer().isPrimaryThread());
|
||||
this.ip = ip;
|
||||
this.name = name;
|
||||
this.bypassPassword = bypassPassword;
|
||||
|
@ -26,6 +29,7 @@ public class TelnetPreLoginEvent extends TelnetEvent implements Cancellable
|
|||
return cancelled;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void setCancelled(boolean cancel)
|
||||
{
|
||||
|
|
|
@ -4,9 +4,10 @@ import java.util.HashMap;
|
|||
import java.util.Map;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.event.Event;
|
||||
import org.bukkit.event.HandlerList;
|
||||
|
||||
public class TelnetRequestDataTagsEvent extends TelnetEvent
|
||||
public class TelnetRequestDataTagsEvent extends Event
|
||||
{
|
||||
|
||||
private static final HandlerList handlers = new HandlerList();
|
||||
|
@ -14,6 +15,7 @@ public class TelnetRequestDataTagsEvent extends TelnetEvent
|
|||
|
||||
public TelnetRequestDataTagsEvent()
|
||||
{
|
||||
super(!Bukkit.getServer().isPrimaryThread());
|
||||
for (final Player player : Bukkit.getServer().getOnlinePlayers())
|
||||
{
|
||||
dataTags.put(player, new HashMap<String, Object>());
|
||||
|
|
Loading…
Reference in a new issue