Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Improperly labeled mod warning

  • Loading branch information...
commit ae3c50552d8628ce9396beaf7f93447e536ac8c2 1 parent c50ad2f
@mbax authored
24 src/main/java/org/kitteh/tag/
@@ -0,0 +1,24 @@
+ * Copyright 2012-2013 Matt Baxter
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.kitteh.tag;
+public class ModAuthorNagException extends RuntimeException {
+ private static final long serialVersionUID = -22222222222L;
+ public ModAuthorNagException(String nag) {
+ super(nag);
+ }
12 src/main/java/org/kitteh/tag/
@@ -21,6 +21,7 @@
import java.util.Set;
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
+import java.util.logging.Level;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
@@ -235,6 +236,17 @@ public void onEnable() {
this.tickPeriod = tickPeriod;
this.debug("Storing main thread: " + TagAPI.mainThread.getName());
+ final String impName = this.getServer().getName();
+ if (impName.equals("CraftBukkit")) {
+ final String impVersion = this.getServer().getVersion();
+ if (!impVersion.startsWith("git-Bukkit")) {
+ this.getLogger().warning("Inconsistency found: Potential mod detected. TagAPI may not run properly.");
+ this.getLogger().log(Level.WARNING, "Report this to the mod author ASAP", new ModAuthorNagException("Mod claims to be \"CraftBukkit\" but is not. Report this error to the mod author so they can fix it ASAP.\nFound \"CraftBukkit\" \"" + impVersion + "\""));
+ }
+ } else {
+ this.getLogger().warning("Mod detected: \"" + impName + "\". TagAPI may not run properly.");
+ }
String versionLoaded;
if (this.getServer().getPluginManager().isPluginEnabled("ProtocolLib")) {

8 comments on commit ae3c505



Ugly error using TagAPI jenkins build 114. Spigot is a very popular bukkit fork used by many large servers in conjunction with BungeeCord. Can it be added to the safe list of TagAPI?

2013-08-30 02:32:47 [WARNING] [TagAPI] Inconsistency found: Potential mod detected. TagAPI may not run properly.
2013-08-30 02:32:47 [WARNING] [TagAPI] Report this to the mod author ASAP
org.kitteh.tag.ModAuthorNagException: Mod claims to be "CraftBukkit" but is not. Report this error to the mod author so they can fix it ASAP.
Found "CraftBukkit" "git-Spigot-1088 (MC: 1.6.2)"
    at org.kitteh.tag.TagAPI.onEnable(
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(
    at org.bukkit.craftbukkit.v1_6_R2.CraftServer.loadPlugin(
    at org.bukkit.craftbukkit.v1_6_R2.CraftServer.enablePlugins(
    at net.minecraft.server.v1_6_R2.MinecraftServer.l(
    at net.minecraft.server.v1_6_R2.MinecraftServer.f(
    at net.minecraft.server.v1_6_R2.MinecraftServer.a(
    at net.minecraft.server.v1_6_R2.DedicatedServer.init(

That problem should be reported to spigot. There is a method in the bukkit api called getName, which is supposed to reply with the implementation name of the server running. Apparently spigot is saying it is craftbukkit, when it should reply "Spigot" (because while it's a fork of craftbukkit it has it's own modifications and implementations). Perhaps my message in the log isn't clear enough to admins. Any advice on a clearer message?

edit: Tablet autocorrected some WEIRD WORDS.



Perhaps instead of printing the entire nag exception in console, have it state something like the following? Of course you could change and word it however you would like, just the full print itself is ugly to see and could be indicated as an error to many server owners.

[WARNING] [TagAPI] A modification claiming to be CraftBukkit has been detected. TagAPI may not function properly 
and will not be officially supported. Found "CraftBukkit" "git-Spigot-1088 (MC: 1.6.2)"

Then perhaps have a config option to disable the warning / inconsistency check?

Figured I'd ping you since he said it should be reported.


There is no functional purpose to this commit, you may ignore the error message and proceed as normal.
This commit is merely designed to cause panic and confusion amongst users of Spigot and this plugin.



There is no functional purpose to this commit, you may ignore the error message and proceed as normal.
This commit is merely designed to cause panic and confusion amongst users of Spigot and this plugin.

This commit wasn't even written with Spigot in mind. Please do not claim to know the purpose of this commit.

@mibby The problem is that implementations are claiming to be CraftBukkit when their implementation is no longer binary compatible. TagAPI has at times not worked with Spigot, and at times does not work with MCPC+ among other mods. However they all currently claim to be CraftBukkit in that method which they should not be doing.

The only reasoning against it is that currently PEX is written to expect CraftBukkit and panics if it isn't there. This is easily solvable and before even writing this code talked with him about the idea of fixing that and he seemed on board. I didn't plan to push this code to a release until a PEX build was ready or at least plenty of time was given.

Regardless, I don't suggest running dev builds of TagAPI unless I specifically say otherwise. I've pushed some weird stuff to the master branch before :3


I honestly think this is how plugins that rely on NMS and OBC should go about it, with all the popular forks. I do agree with @mibby that it shouldn't throw the entire NagException, since it does look like something went wrong with the plugin.


FYI PEX is already fixed to no longer specifically check for craftbukkit. I want to do a release today or tomorrow including that commit.

Please sign in to comment.
Something went wrong with that request. Please try again.