Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package de.cubenetwork.lokykun.cubestats;
- import org.bukkit.block.Block;
- public class BlockCreateTabel {
- public int ID;
- public String name;
- public int[] block = new int[1-95];
- public int[] wool = new int[35001-35015];
- public int[] log = new int[17001-17002];
- public int[] slap = new int[44001-44002];
- public int[] doubleSlap = new int[44001-44002];
- public BlockCreateTabel(int ID, String name){
- this.ID = ID;
- this.name = name;
- //Arrays mit 0 füllen
- for (int i = 1; i <= block.length; i++ ){
- block[i] = 0;
- }
- for (int i = 1; i <= wool.length; i++ ){
- wool[35000 + i] = 0;
- }
- for (int i = 1; i <= log.length; i++ ){
- log[17000 + i] = 0;
- }
- for (int i = 1; i <= slap.length; i++ ){
- slap[44000 + i] = 0;
- }
- for (int i = 1; i <= doubleSlap.length; i++ ){
- doubleSlap[43000 + i] = 0;
- }
- }
- public void setInTabel(Block block){
- //Wool abfangen
- if (block.getTypeId() == 35){
- if (block.getData() != 00){
- wool[35000 + block.getData()]++;
- return;
- }
- }
- //Log abfangen
- if (block.getTypeId() == 17){
- if (block.getData() != 00){
- wool[17000 + block.getData()]++;
- return;
- }
- }
- //Slap abfangen
- if (block.getTypeId() == 44){
- if (block.getData() != 00){
- wool[44000 + block.getData()]++;
- return;
- }
- }
- //DoubelSlap abfangen
- if (block.getTypeId() == 43){
- if (block.getData() != 00){
- wool[43000 + block.getData()]++;
- return;
- }
- }
- // Block abfangen
- this.block[block.getTypeId()]++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement