Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-12 22:20:08 +01:00
Renamed some classes.
Dieser Commit ist enthalten in:
Ursprung
4d06bc5df1
Commit
7befb2e051
@ -96,7 +96,7 @@ public class EditSession {
|
||||
* Default constructor. There is no maximum blocks limit.
|
||||
*/
|
||||
public EditSession() {
|
||||
server = WorldEditLibrary.getServer();
|
||||
server = WorldEditController.getServer();
|
||||
}
|
||||
|
||||
/**
|
||||
@ -108,7 +108,7 @@ public class EditSession {
|
||||
}
|
||||
this.maxBlocks = maxBlocks;
|
||||
|
||||
server = WorldEditLibrary.getServer();
|
||||
server = WorldEditController.getServer();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,6 @@
|
||||
// $Id$
|
||||
/*
|
||||
* WorldEditLibrary
|
||||
* WorldEdit
|
||||
* Copyright (C) 2010 sk89q <http://www.sk89q.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@ -31,7 +31,7 @@ public class HmodWorldEditListener extends PluginListener {
|
||||
*/
|
||||
@Override
|
||||
public void onDisconnect(Player player) {
|
||||
WorldEditLibrary worldEdit = WorldEditLibrary.getInstance();
|
||||
WorldEditController worldEdit = WorldEditController.getInstance();
|
||||
worldEdit.removeSession(new HmodWorldEditPlayer(player));
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ public class HmodWorldEditListener extends PluginListener {
|
||||
@Override
|
||||
public boolean onBlockCreate(Player modPlayer, Block blockPlaced,
|
||||
Block blockClicked, int itemInHand) {
|
||||
WorldEditLibrary worldEdit = WorldEditLibrary.getInstance();
|
||||
WorldEditController worldEdit = WorldEditController.getInstance();
|
||||
WorldEditPlayer player = new HmodWorldEditPlayer(modPlayer);
|
||||
|
||||
if (itemInHand != 271) { return false; }
|
||||
@ -82,7 +82,7 @@ public class HmodWorldEditListener extends PluginListener {
|
||||
if (!canUseCommand(modPlayer, "//pos1")
|
||||
&& !canUseCommand(modPlayer, "//")) { return false; }
|
||||
|
||||
WorldEditLibrary worldEdit = WorldEditLibrary.getInstance();
|
||||
WorldEditController worldEdit = WorldEditController.getInstance();
|
||||
WorldEditPlayer player = new HmodWorldEditPlayer(modPlayer);
|
||||
WorldEditSession session = worldEdit.getSession(player);
|
||||
|
||||
@ -114,12 +114,12 @@ public class HmodWorldEditListener extends PluginListener {
|
||||
if (session.hasSuperPickAxe()) {
|
||||
Vector pos = new Vector(blockClicked.getX(),
|
||||
blockClicked.getY(), blockClicked.getZ());
|
||||
if (WorldEditLibrary.getServer().getBlockType(pos) == 7
|
||||
if (WorldEditController.getServer().getBlockType(pos) == 7
|
||||
&& !canUseCommand(modPlayer, "/worldeditbedrock")) {
|
||||
return true;
|
||||
}
|
||||
|
||||
WorldEditLibrary.getServer().setBlockType(pos, 0);
|
||||
WorldEditController.getServer().setBlockType(pos, 0);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -136,7 +136,7 @@ public class HmodWorldEditListener extends PluginListener {
|
||||
*/
|
||||
@Override
|
||||
public boolean onCommand(Player modPlayer, String[] split) {
|
||||
WorldEditLibrary worldEdit = WorldEditLibrary.getInstance();
|
||||
WorldEditController worldEdit = WorldEditController.getInstance();
|
||||
|
||||
try {
|
||||
// Legacy /, command
|
||||
|
@ -44,8 +44,8 @@ public class WorldEdit extends Plugin {
|
||||
/**
|
||||
* WorldEditLibrary instance.
|
||||
*/
|
||||
private static final WorldEditLibrary worldEdit =
|
||||
WorldEditLibrary.setup(new HmodServerInterface());
|
||||
private static final WorldEditController worldEdit =
|
||||
WorldEditController.setup(new HmodServerInterface());
|
||||
/**
|
||||
* Listener for the plugin system.
|
||||
*/
|
||||
@ -87,7 +87,7 @@ public class WorldEdit extends Plugin {
|
||||
// Get allowed blocks
|
||||
HashSet<Integer> allowedBlocks = new HashSet<Integer>();
|
||||
for (String b : properties.getString("allowed-blocks",
|
||||
WorldEditLibrary.getDefaultAllowedBlocks()).split(",")) {
|
||||
WorldEditController.getDefaultAllowedBlocks()).split(",")) {
|
||||
try {
|
||||
allowedBlocks.add(Integer.parseInt(b));
|
||||
} catch (NumberFormatException e) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
// $Id$
|
||||
/*
|
||||
* WorldEditLibrary
|
||||
* WorldEdit
|
||||
* Copyright (C) 2010 sk89q <http://www.sk89q.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
@ -37,11 +37,11 @@ import java.io.*;
|
||||
*
|
||||
* @author sk89q
|
||||
*/
|
||||
public class WorldEditLibrary {
|
||||
public class WorldEditController {
|
||||
/**
|
||||
* WorldEditLibrary instance.
|
||||
*/
|
||||
private static WorldEditLibrary instance;
|
||||
private static WorldEditController instance;
|
||||
/**
|
||||
* Server interface.
|
||||
*/
|
||||
@ -93,8 +93,8 @@ public class WorldEditLibrary {
|
||||
* @param server
|
||||
* @return
|
||||
*/
|
||||
public static WorldEditLibrary setup(ServerInterface server) {
|
||||
WorldEditLibrary worldEdit = new WorldEditLibrary();
|
||||
public static WorldEditController setup(ServerInterface server) {
|
||||
WorldEditController worldEdit = new WorldEditController();
|
||||
worldEdit.server = server;
|
||||
instance = worldEdit;
|
||||
return worldEdit;
|
||||
@ -105,7 +105,7 @@ public class WorldEditLibrary {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static WorldEditLibrary getInstance() {
|
||||
public static WorldEditController getInstance() {
|
||||
return instance;
|
||||
}
|
||||
|
||||
@ -121,7 +121,7 @@ public class WorldEditLibrary {
|
||||
/**
|
||||
* Construct an instance of the plugin.
|
||||
*/
|
||||
private WorldEditLibrary() {
|
||||
private WorldEditController() {
|
||||
// Note: Commands should only have the phrase 'air' at the end
|
||||
// for now (see SMWorldEditListener.canUseCommand)
|
||||
commands.put("//pos1", "Set editing position #1");
|
@ -35,7 +35,7 @@ public abstract class WorldEditPlayer {
|
||||
* Construct the player.
|
||||
*/
|
||||
public WorldEditPlayer() {
|
||||
server = WorldEditLibrary.getServer();
|
||||
server = WorldEditController.getServer();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren