Initial commit
This commit is contained in:
30
Plugins/Old/Signtp/src/de/craftix/signtp/WarpSign.java
Normal file
30
Plugins/Old/Signtp/src/de/craftix/signtp/WarpSign.java
Normal file
@@ -0,0 +1,30 @@
|
||||
package de.craftix.signtp;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.configuration.file.FileConfiguration;
|
||||
|
||||
|
||||
public class WarpSign {
|
||||
public int id;
|
||||
public Location loc;
|
||||
public World world;
|
||||
|
||||
public WarpSign() {}
|
||||
public WarpSign(int id, Location loc, World world){
|
||||
this.id = id;
|
||||
this.loc = loc;
|
||||
this.world = world;
|
||||
}
|
||||
|
||||
public static int getFreeID(){
|
||||
FileConfiguration config = Main.getPlugin().getConfig();
|
||||
int id = -1;
|
||||
boolean isFree = false;
|
||||
while (!isFree){
|
||||
id++;
|
||||
if (config.contains("Sign." + id + "World")) isFree = true;
|
||||
}
|
||||
return id;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user