geforkt von Mirrors/FastAsyncWorldEdit
Added class to access WorldEdit from other plugins.
Dieser Commit ist enthalten in:
Ursprung
138787c1e2
Commit
97a49d4492
@ -96,4 +96,13 @@ public class WorldEdit extends Plugin {
|
||||
return "(unknown)";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the listener.
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public WorldEditListener getListener() {
|
||||
return listener;
|
||||
}
|
||||
}
|
||||
|
@ -1371,4 +1371,23 @@ public class WorldEditListener extends PluginListener {
|
||||
etc.getInstance().removeCommand(key);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the WorldEditLibrary session for a player. Used for the bridge.
|
||||
*
|
||||
* @param player
|
||||
* @return
|
||||
*/
|
||||
public WorldEditSession _bridgeSession(Player pl) {
|
||||
WorldEditPlayer player = new WorldEditPlayer(pl);
|
||||
|
||||
if (sessions.containsKey(player)) {
|
||||
return sessions.get(player);
|
||||
} else {
|
||||
WorldEditSession session = new WorldEditSession();
|
||||
session.setBlockChangeLimit(defaultChangeLimit);
|
||||
sessions.put(player, session);
|
||||
return session;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
29
src/com/sk89q/worldedit/WorldEditNotInstalled.java
Normale Datei
29
src/com/sk89q/worldedit/WorldEditNotInstalled.java
Normale Datei
@ -0,0 +1,29 @@
|
||||
// $Id$
|
||||
/*
|
||||
* WorldEdit
|
||||
* Copyright (C) 2010 sk89q <http://www.sk89q.com>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package com.sk89q.worldedit;
|
||||
|
||||
/**
|
||||
* Raised when WorldEdit is not installed.
|
||||
*
|
||||
* @author Albert
|
||||
*/
|
||||
public class WorldEditNotInstalled extends WorldEditException {
|
||||
|
||||
}
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren