bukkit

How to implement decent “bad word filter”?

穿精又带淫゛_ 提交于 2019-12-10 12:37:40
问题 How can I create the good bad word chat filter? For example, let users not type Poop and send them warning. However it should also filter pooopppp , P00p, Po0p, P0o0o0op, (or whatever trick they try to use) etc. 回答1: You should implement some Machine Learning to filter that. I recommend this : Google Tensorflow. What you should do is to create the tensorflow engine, train them with bad words eg : Poop, P0op, Po0pp, etc... and after several training the engine will able to tell that Po0000p

java.lang.IllegalArgumentException: Plugin already initialized. What's going on?

点点圈 提交于 2019-12-08 15:29:42
问题 When I'm testing my new plugin an exception keeps getting thrown: java.lang.IllegalArgumentException: Plugin already initialized! Please help! Here's the code: package me.plugin.example; import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.event.Listener; import org.bukkit.ChatColor; import org.bukkit.GameMode; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.player

NoClassDefFoundError: org/slf4j/LoggerFactory with logback

狂风中的少年 提交于 2019-12-08 13:54:40
问题 Please help, For the past couple of days I have been trying to get Logback 1.1.3 to work with my Bukkit plugin. For reference my pom.xml includes these lines: <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-core</artifactId> <version>1.1.3</version> </dependency> <dependency> <groupId>ch.qos.logback</groupId> <artifactId>logback-classic</artifactId> <version>1.1.3</version> </dependency> And the following jars are listed under "Maven Dependencies": logback-core-1.1.3.jar

Perfect way to use MySQL data updating/storing with no lag and error at updating stats

一世执手 提交于 2019-12-08 11:00:04
问题 I'm having issues loading/storing MySQL data, this is my code public void loadPlayer(Player p) { if (isPlayerInDataBase(p)) { Bukkit.getScheduler().runTaskAsynchronously(Main.getInstance(), new Runnable() { @Override public void run() { Connection connection = sql.getConnection(); try { PreparedStatement select = connection .prepareStatement("SELECT * FROM `MurderData` WHERE playername='" + p.getName() + "'"); ResultSet result = select.executeQuery(); if (getPlayerData(p) != null) { while

What is “Type mismatch” and how do I fix it?

浪子不回头ぞ 提交于 2019-12-08 09:56:39
问题 How to fix this error? Type mismatch: cannot convert from element type Object to Block I see it at this line: for (Block b : blocksToSkip){ Here is the full code. @EventHandler(priority=EventPriority.NORMAL, ignoreCancelled=true) public void onEntityExplode(EntityExplodeEvent ev){ ArrayList blocksToSkip = new ArrayList(); Location rootLoc = ev.getLocation(); if (!SkyMagic.IsInIslandWorld(rootLoc)) return; for (Block b : ev.blockList()){ Location loc = b.getLocation(); IslandData data =

Java Interop with Clojure, could not load the plugin

爱⌒轻易说出口 提交于 2019-12-08 08:38:53
问题 I'm trying to write a Bukkit plugin in Clojure. Generally a Bukkit plugin needs to override the Plugin class, have an onEnable() and a onDisable() method. There are also a few other requires, like the result being in a JAR file and a plugin.yml defined, but I have all that. (ns net.jonnay.watershipdown.WatershipDown (:import org.bukkit.Bukkit org.bukkit.plugin.Plugin) (:gen-class :name net.jonnay.watershipdown.WatershipDown :extends org.bukkit.plugin.Plugin :methods [ [onEnable [] void]

Java Interop with Clojure, could not load the plugin

别来无恙 提交于 2019-12-06 15:08:47
I'm trying to write a Bukkit plugin in Clojure. Generally a Bukkit plugin needs to override the Plugin class, have an onEnable() and a onDisable() method. There are also a few other requires, like the result being in a JAR file and a plugin.yml defined, but I have all that. (ns net.jonnay.watershipdown.WatershipDown (:import org.bukkit.Bukkit org.bukkit.plugin.Plugin) (:gen-class :name net.jonnay.watershipdown.WatershipDown :extends org.bukkit.plugin.Plugin :methods [ [onEnable [] void] [onDisable [] void] ] ) ) (set! *warn-on-reflection* true) (defn debug-to-mc-log [^String msg] (let [logger

Setting Block Data from Schematic in Bukkit?

别说谁变了你拦得住时间么 提交于 2019-12-06 07:26:39
问题 I am trying to load and paste a .schematic file (without hooking the MCEdit API) in bukkit. Below is the function/method i use to paste the schematic. While pasting, i keep getting a NullPointerException in the pasting process. When i logged what items were getting placed, i see grass blocks, stone, but not my chests, anything in the chests, or beacons (Maybe even more blocks). The error occurs on this line: block.setData(blockData[index], true); I think this has to do something with the

java.lang.IllegalArgumentException: Plugin already initialized. What's going on?

大城市里の小女人 提交于 2019-12-02 22:39:54
问题 When I'm testing my new plugin an exception keeps getting thrown: java.lang.IllegalArgumentException: Plugin already initialized! Please help! Here's the code: package me.plugin.example; import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.event.Listener; import org.bukkit.ChatColor; import org.bukkit.GameMode; import org.bukkit.command.Command; import org.bukkit.command.CommandSender; import org.bukkit.entity.Player; import org.bukkit.event.EventHandler; import org.bukkit.event.player

Bukkit teleport - nullPointerException

浪子不回头ぞ 提交于 2019-12-02 17:51:51
问题 I am trying to teleport a user to their own realm using the following code: @EventHandler public static void onPortalTravel(PlayerPortalEvent event) throws Exception { if(event.getCause() == PlayerPortalEvent.TeleportCause.END_PORTAL) { int x = event.getPlayer().getLocation().getBlockX(); int y = event.getPlayer().getLocation().getBlockY(); int z = event.getPlayer().getLocation().getBlockZ(); String[] data = getPageData("http://example.com/game.php?type=getRealm&location="+x+":"+y+":"+z )