mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 12:13:54 -07:00
Revert Plugin to Interface, added PluginBase
Fixed Tests, moved TestPlugin out of messaging By: Feildmaster <admin@feildmaster.com>
This commit is contained in:
@@ -3,7 +3,7 @@ package org.bukkit.metadata;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.messaging.TestPlugin;
|
||||
import org.bukkit.plugin.TestPlugin;
|
||||
import org.junit.Test;
|
||||
|
||||
public class FixedMetadataValueTest {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
package org.bukkit.metadata;
|
||||
|
||||
import org.bukkit.plugin.messaging.TestPlugin;
|
||||
import org.bukkit.plugin.TestPlugin;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.concurrent.Callable;
|
||||
|
@@ -16,7 +16,7 @@
|
||||
package org.bukkit.metadata;
|
||||
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.messaging.TestPlugin;
|
||||
import org.bukkit.plugin.TestPlugin;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
@@ -8,7 +8,7 @@ import java.util.List;
|
||||
import java.util.concurrent.Callable;
|
||||
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.messaging.TestPlugin;
|
||||
import org.bukkit.plugin.TestPlugin;
|
||||
import org.junit.Test;
|
||||
|
||||
public class MetadataStoreTest {
|
||||
|
@@ -1,4 +1,4 @@
|
||||
package org.bukkit.plugin.messaging;
|
||||
package org.bukkit.plugin;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.InputStream;
|
||||
@@ -8,14 +8,10 @@ import org.bukkit.command.Command;
|
||||
import org.bukkit.command.CommandSender;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
import org.bukkit.generator.ChunkGenerator;
|
||||
import org.bukkit.plugin.Plugin;
|
||||
import org.bukkit.plugin.PluginDescriptionFile;
|
||||
import org.bukkit.plugin.PluginLoader;
|
||||
import org.bukkit.plugin.PluginLogger;
|
||||
|
||||
import com.avaje.ebean.EbeanServer;
|
||||
|
||||
public class TestPlugin extends Plugin {
|
||||
public class TestPlugin extends PluginBase {
|
||||
private boolean enabled = true;
|
||||
|
||||
final private String pluginName;
|
||||
@@ -28,10 +24,6 @@ public class TestPlugin extends Plugin {
|
||||
this.enabled = enabled;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return pluginName;
|
||||
}
|
||||
|
||||
public File getDataFolder() {
|
||||
throw new UnsupportedOperationException("Not supported.");
|
||||
}
|
||||
@@ -111,20 +103,4 @@ public class TestPlugin extends Plugin {
|
||||
public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
|
||||
throw new UnsupportedOperationException("Not supported.");
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return getName().hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj)
|
||||
return true;
|
||||
if (obj == null)
|
||||
return false;
|
||||
if (getClass() != obj.getClass())
|
||||
return false;
|
||||
return getName().equals(((TestPlugin) obj).getName());
|
||||
}
|
||||
}
|
@@ -1,6 +1,6 @@
|
||||
package org.bukkit.plugin.messaging;
|
||||
|
||||
import org.bukkit.plugin.messaging.ReservedChannelException;
|
||||
import org.bukkit.plugin.TestPlugin;
|
||||
import java.util.Collection;
|
||||
import org.junit.Test;
|
||||
import static org.junit.Assert.*;
|
||||
|
Reference in New Issue
Block a user