mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-28 13:36:33 +01:00
config.yml: Messages als liste auslesen
This commit is contained in:
parent
db762d102a
commit
5adac9a10d
@ -5,6 +5,7 @@ import java.io.IOException;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.concurrent.CopyOnWriteArrayList;
|
import java.util.concurrent.CopyOnWriteArrayList;
|
||||||
|
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
@ -91,14 +92,13 @@ public class ConfigReader {
|
|||||||
}while(configFile.contains(preString));
|
}while(configFile.contains(preString));
|
||||||
|
|
||||||
//Read Messages
|
//Read Messages
|
||||||
id=0;
|
Set<String> list=configFile.getKeys(true);
|
||||||
do{
|
for(String messagePath:list){
|
||||||
id++;
|
if(messagePath.contains("message.")){
|
||||||
preString="message."+id;
|
int messageId=Integer.parseInt(messagePath.replace("message.",""));
|
||||||
if(configFile.contains(preString)){
|
this.msgs.put(messageId,configFile.getString(messagePath));
|
||||||
this.msgs.put(id,configFile.getString(preString));
|
|
||||||
}
|
}
|
||||||
}while(configFile.contains(preString));
|
}
|
||||||
|
|
||||||
//Read Secure Objects
|
//Read Secure Objects
|
||||||
if(configFile.contains("secureobjects")){
|
if(configFile.contains("secureobjects")){
|
||||||
|
Loading…
Reference in New Issue
Block a user